home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / c-runtime / tests / SubClass1.m < prev    next >
Encoding:
Text File  |  1992-08-18  |  768 b   |  69 lines

  1. /* -*-objc-*- */
  2.  
  3. /* 
  4.   $Header$
  5.   $Author: dglattin $
  6.   $Date$
  7.   $Log$
  8.  */
  9.  
  10. #include  <assert.h>
  11. #include  <stdio.h>
  12. #include  <SubClass1.h>
  13.  
  14.  
  15.   static BOOL     flag = NO;
  16.  
  17.  
  18. @implementation SubClass1
  19.  
  20.  
  21. + initialize {
  22.  
  23.   printf( "If you see this message then SubClass1 received a"
  24.     " +initialize method\n" );
  25.   flag = YES;
  26.  
  27.   return self;
  28. }
  29.  
  30.  
  31. + newOther {
  32.  
  33.         assert (flag);
  34.   self = [ self new ];
  35.   return self;
  36. }
  37.  
  38. - hokeyMethod {
  39.  
  40.  
  41.   return self;
  42. }
  43.  
  44.  
  45. - print {
  46.  
  47.  
  48.   printf( "Subclass1 print\n" );
  49.   
  50.   return self;
  51. }
  52.  
  53.  
  54. - print:( const char* )aPhrase {
  55.  
  56.  
  57.   printf( "Subclass1 print:%s\n", aPhrase );
  58.   
  59.   return self;
  60. }
  61.  
  62.  
  63. + ( int )return12 { return 12; }
  64. - ( int )return15 { return 15; }
  65. - ( int )return24 { return 24; }
  66. - ( int )return33 { return 33; }
  67.  
  68.  
  69. @end